package thread02;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ProducterConsumerDemo {

	public static void main(String[] args) {
		Storage storage = new Storage();
		
		ExecutorService service = Executors.newCachedThreadPool();
		
		Producer producer01 = new Producer("腾讯", storage);
		Consumer consumer01 = new Consumer("用户", storage);
		
		service.submit(producer01);
		service.submit(consumer01);
		
		service.shutdown();
	}
	
}
